import Mock from 'mockjs';
export default {
  getAllArticles(config){
    let articles = [];
    for (let i = 0; i < 10; i++) {
      let article = {
        article_id:Mock.mock('@guid'),
        title: Mock.mock('@ctitle(5,10)'),
        content: Mock.mock('@cparagraph(2,5)'),
        img_list: [
          "http://img0.imgtn.bdimg.com/it/u=1823516245,2555177703&fm=15&gp=0.jpg",
          "http://static.7192.com/uploadfile/2016/0303/102247953x_thumb.jpg",
          "http://static.7192.com/uploadfile/2016/0303/102247953x_thumb.jpg"
        ],
        type: Mock.mock('@cparagraph(2,5)'),
        create_time: Mock.mock('@datetime()'),
        update_time: Mock.mock('@datetime()'),
        author: {
          user_id: Mock.mock('@guid'),
          user_name: Mock.mock('@cname()'),
          header_img: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1530514720363&di=60f4cc937818d07985a2d364cd8f0d1d&imgtype=0&src=http%3A%2F%2Fatt3.citysbs.com%2F120x120%2Fchongqing%2F2014%2F11%2F21%2F10%2F500x350-103103_v2_11491416537063141_40e791dfaaa2351f1e179c0cdd62735c.jpg"
        },
        follwers: []
      };
      articles.push(article);
    }
    return {
      success: true,
      data: articles,
      message: '查询成功'
    }
  }
}
